package cn.cdeden.knowledge.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

/**
 * @ProjectName : ecm_hou
 * @Package : com.cdyd.ecm.file.enums
 * @ClassName : StorageTypeEnum
 * @Author : Yu.
 * @Description : // TODO 存储服务区 类型
 * @Date : 2022/8/22 11:30
 * @Version : 1.0
 */
@Getter
@AllArgsConstructor
public enum StorageTypeEnum {

    MINIO("minio");

    /**
     * Request 类型
     */
    private final String type;


    public static StorageTypeEnum find(String type) {
        for (StorageTypeEnum value : StorageTypeEnum.values()) {
            if (StringUtils.equalsIgnoreCase(type,value.getType())) {
                return value;
            }
        }
        return MINIO;
    }
}
